/**
 * Created by caoyang on 17/3/28.
 */
import React, {Component} from 'react';
import {
    View,
    StyleSheet,
    Dimensions
} from 'react-native';

import TabBar from '../../common/TabBar';
import ScrollableTabView from 'react-native-scrollable-tab-view';
import Invoicing from '../invoicing/Invoicing';
import Profile from '../profile/Profile';
import Setting from '../setting/Setting';

var {height, width} = Dimensions.get('window');

var tabIcons = ['ios-create-outline', 'ios-person-outline', 'ios-settings-outline'];
var tabNames = ["我要开票", "我的信息", "设置"];

export default class Main extends Component {

    render() {
        return (
            <View style={styles.container}>
                <ScrollableTabView
                    locked={true}
                    scrollWithoutAnimation={true}
                    tabBarPosition="bottom"
                    renderTabBar={() => <TabBar tabIcons={tabIcons} tabNames={tabNames}/>}>
                    <Invoicing tabLabel="我要开票" {...this.props}/>
                    <Profile tabLabel='我的信息' {...this.props}/>
                    <Setting tabLabel='设置' {...this.props}/>
                </ScrollableTabView>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#FFFFFF',
    },
});
